home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / nihcl-30.lha / nihcl-3.0 / ex / Patient.h < prev    next >
C/C++ Source or Header  |  1990-05-15  |  1KB  |  39 lines

  1. #ifndef PATIENT_H
  2. #define PATIENT_H
  3.  
  4. // Patient.h -- Simple patient record class
  5.  
  6. // $Header: /afs/alw.nih.gov/unix/sun4_40c/usr/local/src/nihcl-3.0/share/ex/RCS/Patient.h,v 3.0 90/05/15 22:43:57 kgorlen Rel $
  7.  
  8. #include "Object.h"
  9. #include "String.h"
  10.  
  11. class Patient: public Object {
  12.     DECLARE_MEMBERS(Patient);
  13.     String _name;       // last name, first name, middle initial
  14.     String _ssn;        // social security number: ddd-dd-dddd
  15.     int _zip;           // ZIP code : ddddd
  16. protected:          // storer() functions for object I/O
  17.     virtual void storer(OIOofd&) const;
  18.     virtual void storer(OIOout&) const;
  19. public:
  20.     Patient(const String& nam, const String& num, int zip);
  21.  
  22.     String name() const         { return _name; }
  23.     String ssn() const          { return _ssn; }
  24.     int zip() const             { return _zip; }
  25.  
  26.     bool operator==(const Patient&) const;
  27.     bool operator!=(const Patient& a) const { return !(*this==a); }
  28.     void operator=(const Patient&);
  29.  
  30.     virtual int compare(const Object&) const;
  31.     virtual void deepenShallowCopy();
  32.     virtual void dumpOn(ostream& strm =cerr) const;
  33.     virtual unsigned hash() const;
  34.     virtual bool isEqual(const Object&) const;
  35.     virtual void printOn(ostream& strm =cout) const;
  36. };
  37.  
  38. #endif
  39.